\hypertarget{class_q_c_p_color_map}{}\section{Q\+C\+P\+Color\+Map Class Reference}
\label{class_q_c_p_color_map}\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}


A plottable representing a two-\/dimensional color map in a plot.  


Inheritance diagram for Q\+C\+P\+Color\+Map\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{class_q_c_p_color_map}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_a482980f2335d09cfb36dd95ba9663197}{data\+Range\+Changed}} (\mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} new\+Range)
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_a978d5d5c9f68cffef8c902b855c04490}{data\+Scale\+Type\+Changed}} (\mbox{\hyperlink{class_q_c_p_axis_a36d8e8658dbaa179bf2aeb973db2d6f0}{Q\+C\+P\+Axis\+::\+Scale\+Type}} scale\+Type)
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_abf4797f86e422ac6e0f732c4ff1a4d49}{gradient\+Changed}} (\mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}} new\+Gradient)
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_q_c_p_color_map_aa37e976d2ee1e2be6c4cd88a64b36215}{Q\+C\+P\+Color\+Map}} (\mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$key\+Axis, \mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$value\+Axis)
\item 
\mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}} $\ast$ \mbox{\hyperlink{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}{data}} () const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ae478f0a5a016420d66c70cc33d6cda1d}\label{class_q_c_p_color_map_ae478f0a5a016420d66c70cc33d6cda1d}} 
\mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} {\bfseries data\+Range} () const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ab796f2dccc90fb7a354b6732c33ec9be}\label{class_q_c_p_color_map_ab796f2dccc90fb7a354b6732c33ec9be}} 
\mbox{\hyperlink{class_q_c_p_axis_a36d8e8658dbaa179bf2aeb973db2d6f0}{Q\+C\+P\+Axis\+::\+Scale\+Type}} {\bfseries data\+Scale\+Type} () const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a15d1877883fa463d44bfcbfd6840d4ca}\label{class_q_c_p_color_map_a15d1877883fa463d44bfcbfd6840d4ca}} 
bool {\bfseries interpolate} () const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a53b5d26b28d6027af0fc863f057965db}\label{class_q_c_p_color_map_a53b5d26b28d6027af0fc863f057965db}} 
bool {\bfseries tight\+Boundary} () const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_acc4bb87c903607b96c08d2bc34bc24cd}\label{class_q_c_p_color_map_acc4bb87c903607b96c08d2bc34bc24cd}} 
\mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}} {\bfseries gradient} () const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a9d37d08c467ac645b86fc71a3b151208}\label{class_q_c_p_color_map_a9d37d08c467ac645b86fc71a3b151208}} 
\mbox{\hyperlink{class_q_c_p_color_scale}{Q\+C\+P\+Color\+Scale}} $\ast$ {\bfseries color\+Scale} () const
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_a5a23e133a20c4ccad35fd32e6c0f9809}{set\+Data}} (\mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}} $\ast$\mbox{\hyperlink{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}{data}}, bool copy=false)
\item 
Q\+\_\+\+S\+L\+OT void \mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}} (const \mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} \&data\+Range)
\item 
Q\+\_\+\+S\+L\+OT void \mbox{\hyperlink{class_q_c_p_color_map_a9d20aa08e3c1f20f22908c45b9c06511}{set\+Data\+Scale\+Type}} (\mbox{\hyperlink{class_q_c_p_axis_a36d8e8658dbaa179bf2aeb973db2d6f0}{Q\+C\+P\+Axis\+::\+Scale\+Type}} scale\+Type)
\item 
Q\+\_\+\+S\+L\+OT void \mbox{\hyperlink{class_q_c_p_color_map_a7313c78360471cead3576341a2c50377}{set\+Gradient}} (const \mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}} \&gradient)
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_a484eaa8a5065cfc386b15375bf98b964}{set\+Interpolate}} (bool enabled)
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_ad03221cc285e5f562a0b13d684b5576d}{set\+Tight\+Boundary}} (bool enabled)
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_aa828921db364fe3c6af4619580ab85fd}{set\+Color\+Scale}} (\mbox{\hyperlink{class_q_c_p_color_scale}{Q\+C\+P\+Color\+Scale}} $\ast$color\+Scale)
\item 
void \mbox{\hyperlink{class_q_c_p_color_map_a856608fa3dd1cc290bcd5f29a5575774}{rescale\+Data\+Range}} (bool recalculate\+Data\+Bounds=false)
\item 
Q\+\_\+\+S\+L\+OT void \mbox{\hyperlink{class_q_c_p_color_map_a5d8158b62d55fcfeaabcb68ce0083e87}{update\+Legend\+Icon}} (Qt\+::\+Transformation\+Mode transform\+Mode=Qt\+::\+Smooth\+Transformation, const Q\+Size \&thumb\+Size=Q\+Size(32, 18))
\item 
virtual void \mbox{\hyperlink{class_q_c_p_color_map_a0545dce5383766885912331705a8e099}{clear\+Data}} ()
\item 
virtual double \mbox{\hyperlink{class_q_c_p_color_map_aba91ea58b489031157ecb777fe79e309}{select\+Test}} (const Q\+PointF \&pos, bool only\+Selectable, Q\+Variant $\ast$details=0) const
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a5efcea591bb5486d968af520a4d43c3a}\label{class_q_c_p_color_map_a5efcea591bb5486d968af520a4d43c3a}} 
virtual void {\bfseries update\+Map\+Image} ()
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a3b0f45a3177be9522d5e9b8cd8ae122d}\label{class_q_c_p_color_map_a3b0f45a3177be9522d5e9b8cd8ae122d}} 
virtual void {\bfseries draw} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter)
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a63584cbf7aa7463e81b58f6e4254423b}\label{class_q_c_p_color_map_a63584cbf7aa7463e81b58f6e4254423b}} 
virtual void {\bfseries draw\+Legend\+Icon} (\mbox{\hyperlink{class_q_c_p_painter}{Q\+C\+P\+Painter}} $\ast$painter, const Q\+RectF \&rect) const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_af294ea4d207e6e3411fb05c69e2c7fa9}\label{class_q_c_p_color_map_af294ea4d207e6e3411fb05c69e2c7fa9}} 
virtual \mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} {\bfseries get\+Key\+Range} (bool \&found\+Range, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8}{Sign\+Domain}} in\+Sign\+Domain=\mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8a082b98cfb91a7363a3b5cd17b0c1cd60}{sd\+Both}}) const
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a06cebc3006df6a156be2c9395be6fa0b}\label{class_q_c_p_color_map_a06cebc3006df6a156be2c9395be6fa0b}} 
virtual \mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} {\bfseries get\+Value\+Range} (bool \&found\+Range, \mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8}{Sign\+Domain}} in\+Sign\+Domain=\mbox{\hyperlink{class_q_c_p_abstract_plottable_a661743478a1d3c09d28ec2711d7653d8a082b98cfb91a7363a3b5cd17b0c1cd60}{sd\+Both}}) const
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ab87609621d16cd3e9d52ad070b327b08}\label{class_q_c_p_color_map_ab87609621d16cd3e9d52ad070b327b08}} 
\mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} {\bfseries m\+Data\+Range}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ab28a4b2def408f83b9818799d5f18446}\label{class_q_c_p_color_map_ab28a4b2def408f83b9818799d5f18446}} 
\mbox{\hyperlink{class_q_c_p_axis_a36d8e8658dbaa179bf2aeb973db2d6f0}{Q\+C\+P\+Axis\+::\+Scale\+Type}} {\bfseries m\+Data\+Scale\+Type}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a8709272aa8f0be3ca111bf3866806f8b}\label{class_q_c_p_color_map_a8709272aa8f0be3ca111bf3866806f8b}} 
\mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}} $\ast$ {\bfseries m\+Map\+Data}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_aab77fe9a8df6f0486ab3507cc5f278fa}\label{class_q_c_p_color_map_aab77fe9a8df6f0486ab3507cc5f278fa}} 
\mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}} {\bfseries m\+Gradient}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_af77e5eba9a844592648edeb6fbe834f1}\label{class_q_c_p_color_map_af77e5eba9a844592648edeb6fbe834f1}} 
bool {\bfseries m\+Interpolate}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ac2e9425fe4381b496726e1c09f978302}\label{class_q_c_p_color_map_ac2e9425fe4381b496726e1c09f978302}} 
bool {\bfseries m\+Tight\+Boundary}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a95b4100bacc3387652c988b071ec9db7}\label{class_q_c_p_color_map_a95b4100bacc3387652c988b071ec9db7}} 
Q\+Pointer$<$ \mbox{\hyperlink{class_q_c_p_color_scale}{Q\+C\+P\+Color\+Scale}} $>$ {\bfseries m\+Color\+Scale}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a66110813b42eca78b64095b2a1f285a0}\label{class_q_c_p_color_map_a66110813b42eca78b64095b2a1f285a0}} 
Q\+Image {\bfseries m\+Map\+Image}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_acad3d52f3572436d5f2e4057911ea8d3}\label{class_q_c_p_color_map_acad3d52f3572436d5f2e4057911ea8d3}} 
Q\+Image {\bfseries m\+Undersampled\+Map\+Image}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ada522988db02cb531767d38c5029ef60}\label{class_q_c_p_color_map_ada522988db02cb531767d38c5029ef60}} 
Q\+Pixmap {\bfseries m\+Legend\+Icon}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_ac9aea6a5c193d7fa866bc7b26e79ef2c}\label{class_q_c_p_color_map_ac9aea6a5c193d7fa866bc7b26e79ef2c}} 
bool {\bfseries m\+Map\+Image\+Invalidated}
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a1cdf9df76adcfae45261690aa0ca2198}\label{class_q_c_p_color_map_a1cdf9df76adcfae45261690aa0ca2198}} 
class {\bfseries Q\+Custom\+Plot}
\item 
\mbox{\Hypertarget{class_q_c_p_color_map_a8429035e7adfbd7f05805a6530ad5e3b}\label{class_q_c_p_color_map_a8429035e7adfbd7f05805a6530ad5e3b}} 
class {\bfseries Q\+C\+P\+Legend}
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
A plottable representing a two-\/dimensional color map in a plot. 



The data is stored in the class \mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}}, which can be accessed via the \mbox{\hyperlink{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}{data()}} method.

A color map has three dimensions to represent a data point\+: The {\itshape key} dimension, the {\itshape value} dimension and the {\itshape data} dimension. As with other plottables such as graphs, {\itshape key} and {\itshape value} correspond to two orthogonal axes on the \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} surface that you specify in the Q\+Color\+Map constructor. The {\itshape data} dimension however is encoded as the color of the point at ({\itshape key}, {\itshape value}).

Set the number of points (or {\itshape cells}) in the key/value dimension via \mbox{\hyperlink{class_q_c_p_color_map_data_a0d9ff35c299d0478b682bfbcdd9c097e}{Q\+C\+P\+Color\+Map\+Data\+::set\+Size}}. The plot coordinate range over which these points will be displayed is specified via \mbox{\hyperlink{class_q_c_p_color_map_data_aad9c1c7c703c1339489fc730517c83d4}{Q\+C\+P\+Color\+Map\+Data\+::set\+Range}}. The first cell will be centered on the lower range boundary and the last cell will be centered on the upper range boundary. The data can be set by either accessing the cells directly with \mbox{\hyperlink{class_q_c_p_color_map_data_a8e75eaf8746596319032a93f3d2d0683}{Q\+C\+P\+Color\+Map\+Data\+::set\+Cell}} or by addressing the cells via their plot coordinates with \mbox{\hyperlink{class_q_c_p_color_map_data_afd2083ccfd6987ec94aa7ef8e91ca39a}{Q\+C\+P\+Color\+Map\+Data\+::set\+Data}}. If possible, you should prefer set\+Cell, since it doesn\textquotesingle{}t need to do any coordinate transformation and thus performs a bit better.

The cell with index (0, 0) is at the bottom left, if the color map uses normal (i.\+e. not reversed) key and value axes.

To show the user which colors correspond to which {\itshape data} values, a \mbox{\hyperlink{class_q_c_p_color_scale}{Q\+C\+P\+Color\+Scale}} is typically placed to the right of the axis rect. See the documentation there for details on how to add and use a color scale.\hypertarget{class_q_c_p_statistical_box_appearance}{}\subsection{Changing the appearance}\label{class_q_c_p_statistical_box_appearance}
The central part of the appearance is the color gradient, which can be specified via \mbox{\hyperlink{class_q_c_p_color_map_a7313c78360471cead3576341a2c50377}{set\+Gradient}}. See the documentation of \mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}} for details on configuring a color gradient.

The {\itshape data} range that is mapped to the colors of the gradient can be specified with \mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}}. To make the data range encompass the whole data set minimum to maximum, call \mbox{\hyperlink{class_q_c_p_color_map_a856608fa3dd1cc290bcd5f29a5575774}{rescale\+Data\+Range}}.\hypertarget{class_q_c_p_statistical_box_usage}{}\subsection{Usage}\label{class_q_c_p_statistical_box_usage}
Like all data representing objects in \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}}, the \mbox{\hyperlink{class_q_c_p_color_map}{Q\+C\+P\+Color\+Map}} is a plottable (\mbox{\hyperlink{class_q_c_p_abstract_plottable}{Q\+C\+P\+Abstract\+Plottable}}). So the plottable-\/interface of \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} applies (\mbox{\hyperlink{class_q_custom_plot_a32de81ff53e263e785b83b52ecd99d6f}{Q\+Custom\+Plot\+::plottable}}, \mbox{\hyperlink{class_q_custom_plot_ab7ad9174f701f9c6f64e378df77927a6}{Q\+Custom\+Plot\+::add\+Plottable}}, \mbox{\hyperlink{class_q_custom_plot_af3dafd56884208474f311d6226513ab2}{Q\+Custom\+Plot\+::remove\+Plottable}}, etc.)

Usually, you first create an instance and add it to the custom\+Plot\+: 
\begin{DoxyCodeInclude}
\end{DoxyCodeInclude}
and then modify the properties of the newly created color map, e.\+g.\+: 
\begin{DoxyCodeInclude}
\end{DoxyCodeInclude}
 \begin{DoxyNote}{Note}
The \mbox{\hyperlink{class_q_c_p_color_map}{Q\+C\+P\+Color\+Map}} always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use \mbox{\hyperlink{class_q_c_p_color_map}{Q\+C\+P\+Color\+Map}} with logarithmic axes, you shouldn\textquotesingle{}t use the \mbox{\hyperlink{class_q_c_p_color_map_data_afd2083ccfd6987ec94aa7ef8e91ca39a}{Q\+C\+P\+Color\+Map\+Data\+::set\+Data}} method as it uses a linear transformation to determine the cell index. Rather directly access the cell index with \mbox{\hyperlink{class_q_c_p_color_map_data_a8e75eaf8746596319032a93f3d2d0683}{Q\+C\+P\+Color\+Map\+Data\+::set\+Cell}}. 
\end{DoxyNote}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_q_c_p_color_map_aa37e976d2ee1e2be6c4cd88a64b36215}\label{class_q_c_p_color_map_aa37e976d2ee1e2be6c4cd88a64b36215}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{Q\+C\+P\+Color\+Map()}{QCPColorMap()}}
{\footnotesize\ttfamily Q\+C\+P\+Color\+Map\+::\+Q\+C\+P\+Color\+Map (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$}]{key\+Axis,  }\item[{\mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}} $\ast$}]{value\+Axis }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}

Constructs a color map with the specified {\itshape key\+Axis} and {\itshape value\+Axis}.

The constructed \mbox{\hyperlink{class_q_c_p_color_map}{Q\+C\+P\+Color\+Map}} can be added to the plot with \mbox{\hyperlink{class_q_custom_plot_ab7ad9174f701f9c6f64e378df77927a6}{Q\+Custom\+Plot\+::add\+Plottable}}, \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} then takes ownership of the color map. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_q_c_p_color_map_a0545dce5383766885912331705a8e099}\label{class_q_c_p_color_map_a0545dce5383766885912331705a8e099}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!clear\+Data@{clear\+Data}}
\index{clear\+Data@{clear\+Data}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{clear\+Data()}{clearData()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::clear\+Data (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Clears the colormap data by calling \mbox{\hyperlink{class_q_c_p_color_map_data_a9910ba830e96955bd5c8e5bef1e77ef3}{Q\+C\+P\+Color\+Map\+Data\+::clear()}} on the internal data. This also resizes the map to 0x0 cells. 

Implements \mbox{\hyperlink{class_q_c_p_abstract_plottable_a86e5b8fd4b6ff4f4084e7ea4c573fc53}{Q\+C\+P\+Abstract\+Plottable}}.

\mbox{\Hypertarget{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}\label{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!data@{data}}
\index{data@{data}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{data()}{data()}}
{\footnotesize\ttfamily \mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}} $\ast$ Q\+C\+P\+Color\+Map\+::data (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

Returns a pointer to the internal data storage of type \mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}}. Access this to modify data points (cells) and the color map key/value range.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_map_a5a23e133a20c4ccad35fd32e6c0f9809}{set\+Data}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_a482980f2335d09cfb36dd95ba9663197}\label{class_q_c_p_color_map_a482980f2335d09cfb36dd95ba9663197}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!data\+Range\+Changed@{data\+Range\+Changed}}
\index{data\+Range\+Changed@{data\+Range\+Changed}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{data\+Range\+Changed}{dataRangeChanged}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::data\+Range\+Changed (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}}}]{new\+Range }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [signal]}}

This signal is emitted when the data range changes.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_a978d5d5c9f68cffef8c902b855c04490}\label{class_q_c_p_color_map_a978d5d5c9f68cffef8c902b855c04490}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!data\+Scale\+Type\+Changed@{data\+Scale\+Type\+Changed}}
\index{data\+Scale\+Type\+Changed@{data\+Scale\+Type\+Changed}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{data\+Scale\+Type\+Changed}{dataScaleTypeChanged}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::data\+Scale\+Type\+Changed (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_axis_a36d8e8658dbaa179bf2aeb973db2d6f0}{Q\+C\+P\+Axis\+::\+Scale\+Type}}}]{scale\+Type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [signal]}}

This signal is emitted when the data scale type changes.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_map_a9d20aa08e3c1f20f22908c45b9c06511}{set\+Data\+Scale\+Type}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_abf4797f86e422ac6e0f732c4ff1a4d49}\label{class_q_c_p_color_map_abf4797f86e422ac6e0f732c4ff1a4d49}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!gradient\+Changed@{gradient\+Changed}}
\index{gradient\+Changed@{gradient\+Changed}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{gradient\+Changed}{gradientChanged}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::gradient\+Changed (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}}}]{new\+Gradient }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [signal]}}

This signal is emitted when the gradient changes.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_map_a7313c78360471cead3576341a2c50377}{set\+Gradient}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_a856608fa3dd1cc290bcd5f29a5575774}\label{class_q_c_p_color_map_a856608fa3dd1cc290bcd5f29a5575774}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!rescale\+Data\+Range@{rescale\+Data\+Range}}
\index{rescale\+Data\+Range@{rescale\+Data\+Range}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{rescale\+Data\+Range()}{rescaleDataRange()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::rescale\+Data\+Range (\begin{DoxyParamCaption}\item[{bool}]{recalculate\+Data\+Bounds = {\ttfamily false} }\end{DoxyParamCaption})}

Sets the data range (\mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}}) to span the minimum and maximum values that occur in the current data set. This corresponds to the \mbox{\hyperlink{class_q_c_p_abstract_plottable_ae96b83c961e257da116c6acf9c7da308}{rescale\+Key\+Axis}} or \mbox{\hyperlink{class_q_c_p_abstract_plottable_aa1e408bb2d13999150c3f7f8a8579ca9}{rescale\+Value\+Axis}} methods, only for the third data dimension of the color map.

The minimum and maximum values of the data set are buffered in the internal \mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}} instance (\mbox{\hyperlink{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}{data}}). As data is updated via its \mbox{\hyperlink{class_q_c_p_color_map_data_a8e75eaf8746596319032a93f3d2d0683}{Q\+C\+P\+Color\+Map\+Data\+::set\+Cell}} or \mbox{\hyperlink{class_q_c_p_color_map_data_afd2083ccfd6987ec94aa7ef8e91ca39a}{Q\+C\+P\+Color\+Map\+Data\+::set\+Data}}, the buffered minimum and maximum values are updated, too. For performance reasons, however, they are only updated in an expanding fashion. So the buffered maximum can only increase and the buffered minimum can only decrease. In consequence, changes to the data that actually lower the maximum of the data set (by overwriting the cell holding the current maximum with a smaller value), aren\textquotesingle{}t recognized and the buffered maximum overestimates the true maximum of the data set. The same happens for the buffered minimum. To recalculate the true minimum and maximum by explicitly looking at each cell, the method \mbox{\hyperlink{class_q_c_p_color_map_data_ab235ade8a4d64bd3adb26a99b3dd57ee}{Q\+C\+P\+Color\+Map\+Data\+::recalculate\+Data\+Bounds}} can be used. For convenience, setting the parameter {\itshape recalculate\+Data\+Bounds} calls this method before setting the data range to the buffered minimum and maximum.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_aba91ea58b489031157ecb777fe79e309}\label{class_q_c_p_color_map_aba91ea58b489031157ecb777fe79e309}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!select\+Test@{select\+Test}}
\index{select\+Test@{select\+Test}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{select\+Test()}{selectTest()}}
{\footnotesize\ttfamily double Q\+C\+P\+Color\+Map\+::select\+Test (\begin{DoxyParamCaption}\item[{const Q\+PointF \&}]{pos,  }\item[{bool}]{only\+Selectable,  }\item[{Q\+Variant $\ast$}]{details = {\ttfamily 0} }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}

This function is used to decide whether a click hits a layerable object or not.

{\itshape pos} is a point in pixel coordinates on the \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn\textquotesingle{}t be determined, -\/1.\+0 is returned. Further, if {\itshape only\+Selectable} is true and the object is not selectable, -\/1.\+0 is returned, too.

If the object is represented not by single lines but by an area like a \mbox{\hyperlink{class_q_c_p_item_text}{Q\+C\+P\+Item\+Text}} or the bars of a \mbox{\hyperlink{class_q_c_p_bars}{Q\+C\+P\+Bars}} plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot\textquotesingle{}s selection tolerance. (typically the selection\+Tolerance multiplied by 0.\+99).

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.\+e. closer than 0.\+99$\ast$selection\+Tolerance).

The actual setting of the selection state is not done by this function. This is handled by the parent \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} when the mouse\+Release\+Event occurs, and the finally selected object is notified via the select\+Event/deselect\+Event methods.

{\itshape details} is an optional output parameter. Every layerable subclass may place any information in {\itshape details}. This information will be passed to select\+Event when the parent \mbox{\hyperlink{class_q_custom_plot}{Q\+Custom\+Plot}} decides on the basis of this select\+Test call, that the object was successfully selected. The subsequent call to select\+Event will carry the {\itshape details}. This is useful for multi-\/part objects (like \mbox{\hyperlink{class_q_c_p_axis}{Q\+C\+P\+Axis}}). This way, a possibly complex calculation to decide which part was clicked is only done once in \mbox{\hyperlink{class_q_c_p_color_map_aba91ea58b489031157ecb777fe79e309}{select\+Test}}. The result (i.\+e. the actually clicked part) can then be placed in {\itshape details}. So in the subsequent select\+Event, the decision which part was selected doesn\textquotesingle{}t have to be done a second time for a single selection operation.

You may pass 0 as {\itshape details} to indicate that you are not interested in those selection details.

\begin{DoxySeeAlso}{See also}
select\+Event, deselect\+Event, \mbox{\hyperlink{class_q_custom_plot_a5ee1e2f6ae27419deca53e75907c27e5}{Q\+Custom\+Plot\+::set\+Interactions}} 
\end{DoxySeeAlso}


Implements \mbox{\hyperlink{class_q_c_p_abstract_plottable_a38efe9641d972992a3d44204bc80ec1d}{Q\+C\+P\+Abstract\+Plottable}}.

\mbox{\Hypertarget{class_q_c_p_color_map_aa828921db364fe3c6af4619580ab85fd}\label{class_q_c_p_color_map_aa828921db364fe3c6af4619580ab85fd}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Color\+Scale@{set\+Color\+Scale}}
\index{set\+Color\+Scale@{set\+Color\+Scale}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Color\+Scale()}{setColorScale()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Color\+Scale (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_color_scale}{Q\+C\+P\+Color\+Scale}} $\ast$}]{color\+Scale }\end{DoxyParamCaption})}

Associates the color scale {\itshape color\+Scale} with this color map.

This means that both the color scale and the color map synchronize their gradient, data range and data scale type (\mbox{\hyperlink{class_q_c_p_color_map_a7313c78360471cead3576341a2c50377}{set\+Gradient}}, \mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}}, \mbox{\hyperlink{class_q_c_p_color_map_a9d20aa08e3c1f20f22908c45b9c06511}{set\+Data\+Scale\+Type}}). Multiple color maps can be associated with one single color scale. This causes the color maps to also synchronize those properties, via the mutual color scale.

This function causes the color map to adopt the current color gradient, data range and data scale type of {\itshape color\+Scale}. After this call, you may change these properties at either the color map or the color scale, and the setting will be applied to both.

Pass 0 as {\itshape color\+Scale} to disconnect the color scale from this color map again. \mbox{\Hypertarget{class_q_c_p_color_map_a5a23e133a20c4ccad35fd32e6c0f9809}\label{class_q_c_p_color_map_a5a23e133a20c4ccad35fd32e6c0f9809}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Data@{set\+Data}}
\index{set\+Data@{set\+Data}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Data()}{setData()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_color_map_data}{Q\+C\+P\+Color\+Map\+Data}} $\ast$}]{data,  }\item[{bool}]{copy = {\ttfamily false} }\end{DoxyParamCaption})}

Replaces the current \mbox{\hyperlink{class_q_c_p_color_map_a047d7eb3ae657f93f2f39b5e68b79451}{data}} with the provided {\itshape data}.

If {\itshape copy} is set to true, the {\itshape data} object will only be copied. if false, the color map takes ownership of the passed data and replaces the internal data pointer with it. This is significantly faster than copying for large datasets. \mbox{\Hypertarget{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}\label{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Data\+Range@{set\+Data\+Range}}
\index{set\+Data\+Range@{set\+Data\+Range}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Data\+Range()}{setDataRange()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Data\+Range (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_q_c_p_range}{Q\+C\+P\+Range}} \&}]{data\+Range }\end{DoxyParamCaption})}

Sets the data range of this color map to {\itshape data\+Range}. The data range defines which data values are mapped to the color gradient.

To make the data range span the full range of the data set, use \mbox{\hyperlink{class_q_c_p_color_map_a856608fa3dd1cc290bcd5f29a5575774}{rescale\+Data\+Range}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_scale_abe88633003a26d1e756aa74984587fef}{Q\+C\+P\+Color\+Scale\+::set\+Data\+Range}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_a9d20aa08e3c1f20f22908c45b9c06511}\label{class_q_c_p_color_map_a9d20aa08e3c1f20f22908c45b9c06511}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Data\+Scale\+Type@{set\+Data\+Scale\+Type}}
\index{set\+Data\+Scale\+Type@{set\+Data\+Scale\+Type}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Data\+Scale\+Type()}{setDataScaleType()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Data\+Scale\+Type (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_q_c_p_axis_a36d8e8658dbaa179bf2aeb973db2d6f0}{Q\+C\+P\+Axis\+::\+Scale\+Type}}}]{scale\+Type }\end{DoxyParamCaption})}

Sets whether the data is correlated with the color gradient linearly or logarithmically.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_scale_aeb6107d67dd7325145b2498abae67fc3}{Q\+C\+P\+Color\+Scale\+::set\+Data\+Scale\+Type}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_a7313c78360471cead3576341a2c50377}\label{class_q_c_p_color_map_a7313c78360471cead3576341a2c50377}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Gradient@{set\+Gradient}}
\index{set\+Gradient@{set\+Gradient}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Gradient()}{setGradient()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Gradient (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}} \&}]{gradient }\end{DoxyParamCaption})}

Sets the color gradient that is used to represent the data. For more details on how to create an own gradient or use one of the preset gradients, see \mbox{\hyperlink{class_q_c_p_color_gradient}{Q\+C\+P\+Color\+Gradient}}.

The colors defined by the gradient will be used to represent data values in the currently set data range, see \mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}}. Data points that are outside this data range will either be colored uniformly with the respective gradient boundary color, or the gradient will repeat, depending on \mbox{\hyperlink{class_q_c_p_color_gradient_a39d6448155fc00a219f239220d14bb39}{Q\+C\+P\+Color\+Gradient\+::set\+Periodic}}.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_scale_a1f29583bb6f1e7f473b62fb712be3940}{Q\+C\+P\+Color\+Scale\+::set\+Gradient}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_q_c_p_color_map_a484eaa8a5065cfc386b15375bf98b964}\label{class_q_c_p_color_map_a484eaa8a5065cfc386b15375bf98b964}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Interpolate@{set\+Interpolate}}
\index{set\+Interpolate@{set\+Interpolate}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Interpolate()}{setInterpolate()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Interpolate (\begin{DoxyParamCaption}\item[{bool}]{enabled }\end{DoxyParamCaption})}

Sets whether the color map image shall use bicubic interpolation when displaying the color map shrinked or expanded, and not at a 1\+:1 pixel-\/to-\/data scale.

\mbox{\Hypertarget{class_q_c_p_color_map_ad03221cc285e5f562a0b13d684b5576d}\label{class_q_c_p_color_map_ad03221cc285e5f562a0b13d684b5576d}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!set\+Tight\+Boundary@{set\+Tight\+Boundary}}
\index{set\+Tight\+Boundary@{set\+Tight\+Boundary}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{set\+Tight\+Boundary()}{setTightBoundary()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::set\+Tight\+Boundary (\begin{DoxyParamCaption}\item[{bool}]{enabled }\end{DoxyParamCaption})}

Sets whether the outer most data rows and columns are clipped to the specified key and value range (see \mbox{\hyperlink{class_q_c_p_color_map_data_a0738c485f3c9df9ea1241b7a8bb6a86e}{Q\+C\+P\+Color\+Map\+Data\+::set\+Key\+Range}}, \mbox{\hyperlink{class_q_c_p_color_map_data_ada1b2680ba96a5f4175b6d341cf75d23}{Q\+C\+P\+Color\+Map\+Data\+::set\+Value\+Range}}).

if {\itshape enabled} is set to false, the data points at the border of the color map are drawn with the same width and height as all other data points. Since the data points are represented by rectangles of one color centered on the data coordinate, this means that the shown color map extends by half a data point over the specified key/value range in each direction.

\mbox{\Hypertarget{class_q_c_p_color_map_a5d8158b62d55fcfeaabcb68ce0083e87}\label{class_q_c_p_color_map_a5d8158b62d55fcfeaabcb68ce0083e87}} 
\index{Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}!update\+Legend\+Icon@{update\+Legend\+Icon}}
\index{update\+Legend\+Icon@{update\+Legend\+Icon}!Q\+C\+P\+Color\+Map@{Q\+C\+P\+Color\+Map}}
\subsubsection{\texorpdfstring{update\+Legend\+Icon()}{updateLegendIcon()}}
{\footnotesize\ttfamily void Q\+C\+P\+Color\+Map\+::update\+Legend\+Icon (\begin{DoxyParamCaption}\item[{Qt\+::\+Transformation\+Mode}]{transform\+Mode = {\ttfamily Qt\+:\+:SmoothTransformation},  }\item[{const Q\+Size \&}]{thumb\+Size = {\ttfamily QSize(32,~18)} }\end{DoxyParamCaption})}

Takes the current appearance of the color map and updates the legend icon, which is used to represent this color map in the legend (see \mbox{\hyperlink{class_q_c_p_legend}{Q\+C\+P\+Legend}}).

The {\itshape transform\+Mode} specifies whether the rescaling is done by a faster, low quality image scaling algorithm (Qt\+::\+Fast\+Transformation) or by a slower, higher quality algorithm (Qt\+::\+Smooth\+Transformation).

The current color map appearance is scaled down to {\itshape thumb\+Size}. Ideally, this should be equal to the size of the legend icon (see \mbox{\hyperlink{class_q_c_p_legend_a8b0740cce488bf7010da6beda6898984}{Q\+C\+P\+Legend\+::set\+Icon\+Size}}). If it isn\textquotesingle{}t exactly the configured legend icon size, the thumb will be rescaled during drawing of the legend item.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_q_c_p_color_map_a980b42837821159786a85b4b7dcb8774}{set\+Data\+Range}} 
\end{DoxySeeAlso}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/charts/qcustomplot/\mbox{\hyperlink{qcustomplot_8h}{qcustomplot.\+h}}\item 
R\+:/\+Develop/a0-\/develop/\+Lib\+Q\+Qt/src/charts/qcustomplot/\mbox{\hyperlink{qcustomplot_8cpp}{qcustomplot.\+cpp}}\end{DoxyCompactItemize}
